﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Serialization;

namespace Newtonsoft.Json.Serialization
{
    public static class JsonExtend
    {
        public static string ToJson(this object obj)
        {
            return JsonConvert.SerializeObject(obj, Formatting.Indented);
        }
        public static T FromJson<T>(this string val)
        {
            return JsonConvert.DeserializeObject<T>(val);
        }
    }
}
